<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>hello 子薇</title>
</head>
<body>
  <script>
    // 1. 声明一个对象
    car = {}
    // 2. 设置对象的属性
    car.name = '奔驰'
    car.color = '红色'
    car.length = 4.2
    car.price = 100000
    // 3. 设置对象的行为
    car.run = function(){
      console.log('run')
    }
    // 4. 打印这个对象
    console.log(car)
    car.run()
  </script>
</body>
</html>